<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width">
    <title>Title</title>
    <link rel="stylesheet" href="../css/bootstrap.min.css">
    <link rel="stylesheet" href="../css/main.css">
</head>
<body>
<div class="container-fluid" style="background-color: #F2F2F2">
    <div class="row a" >
        <div class="col-md-2"></div>
        <div class="col-md-1"><a href="http://localhost:63343/qiguai/html/header-2.html?_ijt=efd90n9ot6nh4d8h7na4o1i8a3" target="_top"><img src="../img/logo.png"></a></div>
        <div class="col-md-1"></div>
        <div class="col-md-1"></div>
        <div class="col-md-1"></div>
        <div class="col-md-1"></div>
        <div class="col-md-3" style="margin-top: 30px">
            <div class="top-header">
                <ul><span class="phone">090 - 223 44 66</span></ul>
                <ul><span class="glyphicon glyphicon-envelope"><a href="">  help@trendd.com</a></span></ul>
            </div>
            <div style="clear: both"></div>
            <div class="top-middle">
                <div id="kk">
                    <ul id="cart"><a href="" onclick="f3()" style="border-right:3px white solid;padding-right: 20px"><img  src="../img/shop2.svg"
                                                                                                 alt=""
                                                                                                 style="width: 30px;margin-top: 0px;"></a>
                    </ul>
                </div>
                <div id="er">
                    <ul style="padding-left: 15px;margin-top: 2px"><a href="http://localhost:63343/qiguai/html/login.html" target="_top" style="color: #9B0909;font-weight:bold;">登录</a>
                    </ul>
                </div>
                <div id="err">
                    <!--<bottom type="button" class="btn btn-danger" src="http://localhost:63343/project/html/zhuce.html">/bottom>-->
                    <ul style="padding-left: 15px;margin-top: 2px"><a href="http://localhost:63343/qiguai/html/zhuce.html" target="_top" style="color: #9B0909;font-weight:bold;">注册</a>
                    </ul>
                </div>
                <div id="ert" style="visibility: hidden;font-size: larger;font-weight: bolder" ><div>欢迎你,HelloWorld!</div><div>
                    <a href="" style="font-size: 5px;float: right;position: relative;top:20px;right:-20px"></a></div></div>
            </div>
        </div>
        <div class="col-md-2"></div>
    </div>
    <div class="row b">
        <div class="col-md-2"></div>
        <div class="b-user col-md-8 ">
            <ul><h4><a href="http://localhost:63343/qiguai/html/index-3.html?_ijt=ilov28hgqo2qq1cvdv1isme3js" target="_top">最新产品</a></h4></ul>
            <ul><h4><a href="" onclick="f2()" >全部产品</a></h4></ul>
            <ul><h4><a href="" onclick="f7()">优惠券</a></h4></ul>
            <ul><h4><a href="#0" onclick="f1()" >个人中心</a></h4></ul>
            <!--<ul><h4><a href="" onclick="f4()" >我的订单</a></h4></ul>
            <ul><h4><a href="" onclick="f5()" >我的售后</a></h4></ul>
            <ul><h4><a href="" onclick="f6()" >我的物流</a></h4></ul>-->
            <ul><input type="text"  id="sou" class="form-control" placeholder="Search" style="border-radius: 20px;">
                <a href="#0" onclick="selectall()"><img src="../img/search.svg" alt="" style="margin-left: 170px;margin-top: -54px"></a></ul>
        </div>
        <div class="col-md-2"></div>
    </div>
</div>
<script src="../js/jquery-3.3.1.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/cookie.js"></script>
<script src="../layui/layui.js" charset="utf-8"></script>
<script>
// "" null
//     localStorage.setItem("anchor",)
    var a = getCookie("uname")
// console.log(a)

    // localStorage.setItem("anchor","");

    if(a){
        document.getElementById("er").style.display="none";
        document.getElementById("err").style.display="none";
        document.getElementById("ert").style.visibility="visible";
        $("#us").html(a)
    }

var layer
layui.use('layer', function () {
    layer = layer
})



    function f1() {
            if(a != null){
                // top.location.href ="http://localhost:63343/qiguai/html/userperson.html"
                // localStorage.setItem("anchor",a);
                parent.location.href ="http://localhost:63343/qiguai/html/userperson.html"
            }else {
                layui.use(['form', 'jquery', 'layer'], function () {
                    var form = layui.form
                    var layer = layui.layer
                    form.render('select');  //刷新select选择框
                    form.render('select', 'selectfilter');//刷新layfilter为selectfilter1的select
                    layer.msg('未登录，请登录！')
                })
            }



    }

    function f2() {

            parent.location.href ="http://localhost:63343/qiguai/html/listing-grid-6-sidebar-left.html?_ijt=sbep7270qecgreolj1ejk3pvsi"

    }


    function f3() {

            parent.location.href ="http://localhost:63343/qiguai/cart/cart.html?_ijt=38f0a2da24kuu95ooqa58q4539"

    }








function f7() {
        parent.location.href ="http://localhost:63343/qiguai/html/ucouponshow.html"
}

function selectall() {
    var c = document.getElementById("sou").value
    var tmp1 = window.parent.document.getElementsByName("upper");
    var upper
    for(var i=0; i<tmp1.length; ++i)
        if(tmp1.item(i).checked){
            upper =	tmp1.item(i).getAttribute("value");
        }
    var sex
    var tmp2 = window.parent.document.getElementsByName("sex");
    for(var i=0; i<tmp2.length; ++i)
        if(tmp2.item(i).checked){
            sex =	tmp2.item(i).getAttribute("value");
        }
    var brand
    var tmp3= window.parent.document.getElementsByName("brand");
    for(var i=0; i<tmp3.length; ++i)
        if(tmp3.item(i).checked){
            brand =	tmp3.item(i).getAttribute("value");
        }
    var material
    var tmp4= window.parent.document.getElementsByName("material");
    for(var i=0; i<tmp4.length; ++i)
        if(tmp4.item(i).checked){
            material =	tmp4.item(i).getAttribute("value");
        }

    self.parent.frames["iframe2"].frames.GetChildValue(upper,material,brand,1,sex,c);
}

</script>

</body>
</html>